package com.kingsoft.dc.khaos.plugin.core.constants;

/**
 * .
 */
public class Contants {

    public static final String JOBTYPE_GLOBAL_JVM_ARGS = "jobtype.global.jvm.args";

    // built in property name
    public static final String JOBTYPE_JVM_ARGS = "jobtype.jvm.args";

    // built in property name
    public static final String JVM_ARGS = "jvm.args";

    public static final String SPARK_DYNAMICALLOCATION_ENABLE = "conf.spark.dynamicAllocation.enable";

    public static final String SPARK_SHUFFLE_SERVICE_ENABLEED = "conf.spark.shuffle.service.enabled";

    public static final String SPARK_DYNAMICALLOCATION_MAX_EXECUTORS = "conf.spark.dynamicAllocation.maxExecutors";

    public static final String SPARK_DYNAMICALLOCATION_MIN_EXECUTORS = "conf.spark.dynamicAllocation.minExecutors";

    public static final String EXECUTOR_CORES = "executor-cores";

    public static final String EXECUTOR_MEMORY = "executor-memory";

    public static final String DRIVER_MEMORY = "driver-memory";

    public static final String NUM_EXECUTORS = "num-executors";

    public static final String CORES_PER_CU = "cores.per.cu";

    public static final String MEMORY_PER_CU = "memory.per.cu";

    public static final String EXECUTOR_CU_RATIO = "executor.cu.ratio";

    public static final String MIN_EXECUTOR_NUMBER = "min.executor.number";

    public static final String META_CLASS_NAME = "com.kingsoft.dc.khaos.extender.meta.impl.kyligenceDmMetaImpl";
    public static final String META_QUERY_URL_KEY = "metadata-query-service_meta-query";
    public static final String AUTH_SERVER_KEY = "auth-server.url";

    public static final String AUTH_SERVER_AK = "dts.executor.ak";
    public static final String AUTH_SERVER_SK = "dts.executor.sk";

    public static final long GB = 1024 * 1024 * 1024;

    public static final long MB = 1024 * 1024;

    //CU number
    public static final String DTS_RESOURCE_USAGE = "dts.ext.yarn.resource.usage";  //dts.resource.usage 改为 dts.ext.yarn.resource.usage

    // 是否开启 "高级资源设置"
    public static final String YARN_ADVANCED_ENABLE = "yarn_advanced_enable";

    public static final String YARN_RESOURCE_DETAIL = "yarn_resource_detail";

    //  ------- 开启高级资源设置后的属性 start -------
    // 主节点资源数，单位CU
    public static final String DRIVER_CU = "driver_cu";

    // 执行节点资源数，单位CU
    public static final String EXECUTOR_CU = "executor_cu";
    //执行节点个数，单位 个
    public static final String EXECUTOR_NUM = "executor_num";

    // 资源策略：cpu/mem
    public static final String RESOURCE_STRATEGY = "resource_strategy";

    public enum ResourceStrategy{
        MEM("mem"),CPU("cpu");

        private String name;
        ResourceStrategy() {
        }

        ResourceStrategy(String name) {
            this.name = name;
        }


    }
    // ------- 开启高级资源设置后的属性 end -------

}
